// 图片相关接口
import axios from './../../utils/request'

// 获取图片类型列表
export const getImgList = ()=>{
    return axios({
        url:'/api/getimgcategory'
    })
}

// 获取图片列表数据
export const getliebiao=(cateid)=>{
    return axios({
        url:`/api/getimages/${cateid}`,
    })
}

// 获取图片详细页面上面部分缩略图详细数据/api/getthumimages/:imgid
export const getdetailed=(imgid)=>{
    return axios({
        url:`/api/getthumimages/${imgid}`,
    })
}

// 获取图片内容详细/api/getimageInfo/:imgid
export const getconnent=(imgid)=>{
    return axios({
        url:`/api/getimageInfo/${imgid}`,
    })
}

// 获取评论信息
export const getpinglun=(params)=>{
    return axios({
        url:`/api/getcomments/${params.artid}?${params.pageindex}`,
        params
    })
}

// 发表评论/api/postcomment/:artid
export const getcomment=(data)=>{
    return axios({
        method:'post',
        url:`/api/postcomment/${data.artid}`,
        data: `content=${data.content}`
    })
}